The present invention relates to a numerical control apparatus having a function of cutting the interior of an area bounded by a closed curve in a workpiece. More particularly, the invention relates to a numerical control apparatus capable of machining an area from inside which is so narrow in the middle that the locus of the center of the tool (hereinafter referred to as "a tool path", when applicable) intersects itself, and to method for preparing machining data for the area cutting operation.
Formerly, EIA codes or the like were mainly used to input machining program. However, recently, the locus of the center of a machining tool (tool path) is formed based on data on such a final configuration 8 as shown in Fig. 1(a) and other data for instance on a tool diameter. That is, the numerical control apparatus has a so-called offset function that is to calculate and obtain a tool path pattern or offset configuration according to the input configuration 8.
In FIG. 1(a), a machining tool such as an end mill or face mill is used to machine a workpiece 10 to cut the interior of an area 11 bounded by a closed curve 8 (final configuration) in the workpiece. In this case, as shown in FIG. 1(b), several tool paths 9a, 9b, 9c and 9d are determined from the final configuration 8 before the machining operation is started. Since the machining operation is carried out along the tool paths 9a to 9d in this order, the heaviest load is applied to the machining tool in the cutting along the path 9a and the machining speed is thus made relatively lower. During the second to fourth cutting, the machining speed is set to a speed higher than the first cutting speed. The tool path 9a is determined to have an offset value equal to a radius r of the machining tool, and the tool paths 9b and 9c are respectively determined to have an offset value in a range from (2r .times.0.6) to (2r .times.0.7) from the preceding tool path. The machining along 9d is carried out to remove an uncut portion due to abrasion of the machining tool.
In the case where, as shown in FIG. 6, an area 11 to be formed is narrow in the middle, the second tool path 9b will intersect itself. In this case, the workpiece cannot be machined with the conventional numerical control apparatus; that is, it is handled as an erroneously selected workpiece, or a method is employed in which the machining region is divided into a plurality of closed areas so that the tool path may not cross itself, and for each of the closed areas tool paths are determined. In other words, the machining programs are prepared for each of the closed areas. The former case suffers from a difficulty that it is impossible to machine the workpiece completely as required; that is, the region to be machined is not completely machined. The latter case is disadvantageous in that the number of machining steps is increased; that is, a step of dividing the closed area into a plurality of parts, and a step of determining tool paths for each of the parts thus provided are added.